# 运行写好的测试文件
import time
from datetime import datetime

import pytest

if __name__ == '__main__':
    # pytest.main()  # 运行所有的测试类
    # pytest.main(['-k', 'test_shopping.py']) # 运行指定case文件
    # pytest.main(['-k', 'test_shopping.py', '-k', 'test_cart_add.py'])
    # 下载代码包
    dt = datetime.now().strftime('%y%m%d%H%M%S')

    pytest.main([f'--html=reports/report{dt}.html', '--self-contained-html'])
    # pytest.main(['-k', 'test_shopping.py', '-k', 'test_cart_add.py','--html=reports/report.html', '--self-contained-html'])
